home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / fscommand / Xtras / FileXtra4_test.dir / 00024_Script_FileSaveAs behavior < prev    next >
Text File  |  2002-12-20  |  793b  |  30 lines

  1. -- *** NOTE ***
  2. -- 'FileSaveAsDialog()' DOES NOT SAVE A FILE!!!
  3. -- It ONLY puts up a dialog, allowing the user to pick a path and enter a filename.
  4. -- The rest is UP TO YOU!!!
  5.  
  6. on mouseUp me
  7.   fxObj = xtra("FileXtra4").new()
  8.   if not(objectP(fxObj)) then
  9.     WriteInfo("*** Could not instantiate FileXtra4.  Is it in the Xtras folder? ***" & RETURN)
  10.     return
  11.   end if
  12.   
  13.   volumeList = fxObj.fx_VolumesToList()
  14.   volumeToUse = volumeList.getAt(1)
  15.   
  16.   if the platform contains "Mac" then
  17.     filePath = fxObj.fx_FileSaveAsDialog(volumeToUse, "Test Filename.doc", "Choose a Folder, type a name")
  18.   else
  19.     
  20.   end if
  21.   
  22.   if filePath <> "" then
  23.     Alert "File path entered is: " & filePath
  24.   else
  25.     alert "SaveAs dialog cancelled."
  26.   end if
  27.   
  28.   fxObj = 0
  29. end
  30.